Introduction
Hey there, We are happy to see you as our valuable customer of Flirtzy app. Here is the easy documentation to set the app and ready to launch.The documentation contains valuable information, so please read it attentively. Should you need any guidance or have inquiries, our support is just a message away.
Prerequisites
- VPS server required
- Web Server : Nginx
- Preferred Hosting
- Digital ocean (Initial Server Setup with Ubuntu 22.04)
- AWS
- We prefer hosting in
Create your VPS Server in Digital Ocean & Get 200$ Free for 2 monthsClick Here
Setup Database
-
Click
hereto know the
steps.
to create mongodb Account.
- Now, We will create a user to
access the
database.
-
Like as shown in the image, enter username and
password.
- Click on create user and user will
be created.
- Click on Connect to connect
cluster0 you can see like image below.
- Open MongoDB Compass and paste your
mongoDB Connection
String.
-
After clicking on Databases button to
Create Database you
will see like below.
-
Then to import the collection find the Add Data button on
the
Top bar and click on it and then click on
import
file button.
-
Click on Select File
(BROWSE) button and load
the
database.json
file which will be there in
the folder you have extracted.
- Click on import button at the
bottom of the page.
- The database is now fully prepared
for
utilization.
- Click hereto know the steps. to create mongodb Account.
- Now, We will create a user to access the database.
- Like as shown in the image, enter username and password.
- Click on create user and user will be created.
- Click on Connect to connect cluster0 you can see like image below.
- Open MongoDB Compass and paste your mongoDB Connection String.
- After clicking on Databases button to Create Database you will see like below.
- Then to import the collection find the Add Data button on the Top bar and click on it and then click on import file button.
- Click on Select File (BROWSE) button and load the database.json file which will be there in the folder you have extracted.
- Click on import button at the bottom of the page.
- The database is now fully prepared for utilization.
Note :
- You need to import the collections settings, flags, coinplans into your database.
Configure Firebase
- Go to the firebase project you might created while following backend documentation.
- If you don't have, follow the steps below and create one project.
- At first, follow this link https://firebase.google.com/

- Now, Our first step is to establish a Firebase project. A Firebase project serves as a foundational container, enabling us to create and manage various apps within it. Within Firebase, multiple projects can be created.

- Now, we have to give a name to the project, enable Google Analytics for the project, set an analytics location, and accept all the terms and conditions. Firebase console automatically creates a unique id for the project.
- Assigning a unique name to the Firebase project

- Enable Google analytics for the project

- First Choose default Firebase account and then create project


Setup Notification (FCM)
- Follow This guide and setup project at firebase and collect Server key.
- Go to Config.js file of the backend project again and make the changes like below.

SERVER_KEY =”Your Firebase Server Key”
Extracting The Project
- Extract the folder you have downloaded and open the folder
- Open it in visual studio code
Backend Configuration
- Now Open Terminal (Check in the image below)

- For install packages (execute in Terminal) npm install --force

- Insert the MongoDB connection string into your index.js file.
- To access the redirection to the MongoDB connection string simplyClick Here

Setting Up Credentials To The Project in config.js file
- Change Database Credentials in config.js file as shown in the example below
- To enhance the security of our code, we should generate a strong secret key using a reliable source like https://randomkeygen.com/.
- This key should be consistently applied across our back-end, front-end, and app code to ensure uniform protection.
- Change Secret Key in config.js file as shown in the image below.
MONGODB_USERNAME:"YOUR_DB_USERNAME"
MONGODB_PASSWORD:"YOUR_DB_PASSWORD"
MONGODB_DB_NAME:"YOUR_DB_NAME"


- To enhance the security of our code, we should generate a strong JWT Secret Key using a reliable source like https://randomkeygen.com/.
- The JWT Secret Key should be a randomly generated key for instance, "kY4fai9sUT" is an example of such a JWT Secret Key. This key is essential for securing and validating JSON Web Tokens (JWTs) within our application.
- Change JWT Secret Key in config.js file as shown in the image below

- Please proceed with the following steps to generate App password.
-
Now Go to Manage your
Google
Account then click
on
Security to enable 2-Step Verification
(Check
the images below)
- Now click on Turn on button to enable 2-step verification
- Then to select App Passwords option to generate app password
- Now Go to select app > Other(Custom Name) option
- Enter Your project name and click on Generate button
- Copy the generated password and paste it into the password field within your config.js file.
- Enter your email and Copy the generated password and paste it into your config.js file.
.png)
.png)
.png)







- If you don't have domain then you can purchase the domain from GoDaddy,hostinger,Namecheap,HostGator.
- There in the baseURL Replace the https://yourdomain.com/ to Your Domain.
- To access the redirection to the firebase server key simplyClick Here
- Now setup is completed and let's collect some credentials for the backend setup
- Make the changes like below in config.js file
- Now save these credentials by pressing Ctrl + s
- Next, execute the following command in your terminal: npm start. This command will initiate the specified process or application.



Getting The Credential
MONGODB_USERNAME :"YOUR_DB_USERNAME"
MONGODB_PASSWORD :"YOUR_DB_PASSWORD"
MONGO_DB_NAME :"YOUR_DB_NAME"
SECRET_KEY : "YOUR_SECRET_KEY"
JWT_SECRET: "YOUR_JWT_SECRET"
EMAIL:"YOUR_EMAIL"
PASSWORD: "YOUR_PASSWORD"
baseURL: "https://yourdomain.com/"
SERVER_KEY :"YOUR_SERVER_KEY"

Frontend Configuration
- Now Open Terminal (Check in the image below)
- For install packages (execute in Terminal) npm install --force
- There in the baseURL Replace the https://yourdomain.com/ to Your Domain.
- Modify the Secret Key within the "util > config.js" file same asback-end, as shown in the image below
- To update the project name you can update project name in "title" tag (check in image below)
- To update the project logo, simply change project logo with the filename "logo.png," ensuring that the file name remains unchanged.
- Next, execute the following command in your terminal: npm start. This command will initiate the specified process or application.
- Next, execute the following command in your terminal: npm run build. After the build process is initiated, the resulting build is transferred to the server.






- Now, access the Admin Panel by signing in.
